//write a advanced java program that If user enters only one command line argument than inner try block should throw an Exception

public class CommandLine{
    public static void main(String...args) {
        try {
            if (args.length == 1)
                throw new RuntimeException("CustomException: Only one argument provided.");
        }catch (Exception e){
            e.printStackTrace();
        }
        java.util.Arrays.stream(args).forEach(System.out::println);
    }
}
